<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css">
</head>
<body>
  <a href="https://www.baidu.com">212312</a>
  <img src="https://gimg3.baidu.com/search/src=http%3A%2F%2Fpics0.baidu.com%2Ffeed%2F00e93901213fb80ee3c5491e3269ea22b8389423.jpeg%40f_auto%3Ftoken%3D9ef4f920cda851d656cdd0650aded063&refer=http%3A%2F%2Fwww.baidu.com&app=2021&size=f360,240&n=0&g=0n&q=75&fmt=auto?sec=1694624400&t=3718e5c56bd7ee9a9707e99bc61b6f71" alt="">
  <span class="btn btn-info">按钮</span>
</body>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>
<script>

  console.log( $ );

// 发起请求方：file:///Users/liyang/Desktop/sh2305/day27/4ajax%E7%8E%B0%E5%AD%98%E7%9A%84%E9%97%AE%E9%A2%98.html
// 被请求方：https://www.baidu.com/

// 发起请求方：file:///Users/liyang/Desktop/sh2305/day27/4ajax%E7%8E%B0%E5%AD%98%E7%9A%84%E9%97%AE%E9%A2%98.html
// 被请求方：https://gimg3.baidu.com/search/src=http%3A%2F%2Fpics0.baidu.com%2Ffeed%2F00e93901213fb80ee3c5491e3269ea22b8389423.jpeg%40f_auto%3Ftoken%3D9ef4f920cda851d656cdd0650aded063&refer=http%3A%2F%2Fwww.baidu.com&app=2021&size=f360,240&n=0&g=0n&q=75&fmt=auto?sec=1694624400&t=3718e5c56bd7ee9a9707e99bc61b6f71

// 发起请求方：file:///Users/liyang/Desktop/sh2305/day27/4ajax%E7%8E%B0%E5%AD%98%E7%9A%84%E9%97%AE%E9%A2%98.html
// 被请求方：https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css

// 发起请求方：file:///Users/liyang/Desktop/sh2305/day27/4ajax%E7%8E%B0%E5%AD%98%E7%9A%84%E9%97%AE%E9%A2%98.html
// 被请求方：https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js


  // const url = "http://10.11.50.46:3000/getgoods";

  
  const url = "https://www.wanandroid.com/article/list/0/json";

  const xhr = new XMLHttpRequest();
  xhr.open("get", url)
  xhr.onload = function(){
    if(xhr.status === 200){
      console.log(xhr.responseText)
    }
  }
  xhr.send();

</script>
</html>